package com.handpay.nocardpay.baselibrary.pay.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import com.handpay.nocardpay.baselibrary.R;
import com.handpay.nocardpay.baselibrary.commbase.view.activity.BaseActivity;
import com.handpay.nocardpay.baselibrary.pay.qrcodepay.view.fragment.QrCodePayFragment;
import com.handpay.nocardpay.baselibrary.utils.StatusBarUtil;

/**
 * Created by lyang on 2017/9/27.
 */

public class QrCodePayActivity extends BaseActivity {
    @Override
    public void initData() {

    }

    @Override
    public void initView(@Nullable Bundle savedInstanceState) {
        if (findFragment(QrCodePayFragment.class) == null) {
            String pay_type = getIntent().getStringExtra(QrCodePayFragment.QR_CODE_PAY_TYPE);
            double amount = getIntent().getDoubleExtra(QrCodePayFragment.AMOUNT_KEY, 0);
            QrCodePayFragment fragment = QrCodePayFragment.newInstance(pay_type, amount);
            loadRootFragment(R.id.fl_container, fragment);
            StatusBarUtil.setTranslucentForImageViewInFragment(this, null);
        }
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_qrcode;
    }
}
